<!doctype html>



  


<html class="theme-next mist use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>



<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />












  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.1.0" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="HTML+CSS," />








  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.1.0" />






<meta name="description" content="鼠标样式 Cursor: pointer   鼠标变成小手   Cursor: default   小白  Cursor : move    移动   Cursor : text     文本输入 border-radius（圆角矩形）1Border-radius: 左上 右上  右下 左下；  顺时针   标签嵌套 块级元素  —  任何元素可以的。      行内元素  –    行内元素">
<meta name="keywords" content="HTML+CSS">
<meta property="og:type" content="article">
<meta property="og:title" content="前端HTML+CSS（二）">
<meta property="og:url" content="http://yoursite.com/2016/11/29/前端HTML-CSS（二）/index.html">
<meta property="og:site_name" content="JokerLiang">
<meta property="og:description" content="鼠标样式 Cursor: pointer   鼠标变成小手   Cursor: default   小白  Cursor : move    移动   Cursor : text     文本输入 border-radius（圆角矩形）1Border-radius: 左上 右上  右下 左下；  顺时针   标签嵌套 块级元素  —  任何元素可以的。      行内元素  –    行内元素">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2016-11-30T10:07:23.791Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="前端HTML+CSS（二）">
<meta name="twitter:description" content="鼠标样式 Cursor: pointer   鼠标变成小手   Cursor: default   小白  Cursor : move    移动   Cursor : text     文本输入 border-radius（圆角矩形）1Border-radius: 左上 右上  右下 左下；  顺时针   标签嵌套 块级元素  —  任何元素可以的。      行内元素  –    行内元素">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Mist',
    sidebar: {"position":"left","display":"always"},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="http://yoursite.com/2016/11/29/前端HTML-CSS（二）/"/>





  <title> 前端HTML+CSS（二） | JokerLiang </title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  








  <div style="display: none;">
    <script src="//s95.cnzz.com/z_stat.php?id=1260895995&web_id=1260895995" language="JavaScript"></script>
  </div>





  
  
    
  

  <div class="container one-collumn sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-meta ">
  

  <div class="custom-logo-site-title">
    <a href="/"  class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <span class="site-title">JokerLiang</span>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>
  <p class="site-subtitle">永远年轻，永远热泪盈眶。</p>
</div>

<div class="site-nav-toggle">
  <button>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
  </button>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      

      
        <li class="menu-item menu-item-search">
          
            <a href="javascript:;" class="popup-trigger">
          
            
              <i class="menu-item-icon fa fa-search fa-fw"></i> <br />
            
            搜索
          </a>
        </li>
      
    </ul>
  

  
    <div class="site-search">
      
  <div class="popup">
 <span class="search-icon fa fa-search"></span>
 <input type="text" id="local-search-input">
 <div id="local-search-result"></div>
 <span class="popup-btn-close">close</span>
</div>


    </div>
  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
  <link itemprop="mainEntityOfPage" href="http://yoursite.com/2016/11/29/前端HTML-CSS（二）/">

  <span style="display:none" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <meta itemprop="name" content="JokerLiang">
    <meta itemprop="description" content="">
    <meta itemprop="image" content="/images/me.jpg">
  </span>

  <span style="display:none" itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
    <meta itemprop="name" content="JokerLiang">
    <span style="display:none" itemprop="logo" itemscope itemtype="http://schema.org/ImageObject">
      <img style="display:none;" itemprop="url image" alt="JokerLiang" src="">
    </span>
  </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                前端HTML+CSS（二）
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>
              <time title="Post created" itemprop="dateCreated datePublished" datetime="2016-11-29T16:22:22+08:00">
                2016-11-29
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
              <span class="post-meta-divider">|</span>
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/前端基本功/" itemprop="url" rel="index">
                    <span itemprop="name">前端基本功</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          

          
          

          

          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        <h2 id="&#x9F20;&#x6807;&#x6837;&#x5F0F;"><a href="#&#x9F20;&#x6807;&#x6837;&#x5F0F;" class="headerlink" title="&#x9F20;&#x6807;&#x6837;&#x5F0F;"></a>&#x9F20;&#x6807;&#x6837;&#x5F0F;</h2><ul>
<li>Cursor: pointer   &#x9F20;&#x6807;&#x53D8;&#x6210;&#x5C0F;&#x624B;  </li>
<li>Cursor: default   &#x5C0F;&#x767D; </li>
<li>Cursor : move    &#x79FB;&#x52A8;  </li>
<li>Cursor : text     &#x6587;&#x672C;&#x8F93;&#x5165; <h2 id="border-radius&#xFF08;&#x5706;&#x89D2;&#x77E9;&#x5F62;&#xFF09;"><a href="#border-radius&#xFF08;&#x5706;&#x89D2;&#x77E9;&#x5F62;&#xFF09;" class="headerlink" title="border-radius&#xFF08;&#x5706;&#x89D2;&#x77E9;&#x5F62;&#xFF09;"></a>border-radius&#xFF08;&#x5706;&#x89D2;&#x77E9;&#x5F62;&#xFF09;</h2><figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">Border-radius: &#x5DE6;&#x4E0A; &#x53F3;&#x4E0A;  &#x53F3;&#x4E0B; &#x5DE6;&#x4E0B;&#xFF1B;  &#x987A;&#x65F6;&#x9488;</span><br></pre></td></tr></table></figure>
</li>
</ul>
<h2 id="&#x6807;&#x7B7E;&#x5D4C;&#x5957;"><a href="#&#x6807;&#x7B7E;&#x5D4C;&#x5957;" class="headerlink" title="&#x6807;&#x7B7E;&#x5D4C;&#x5957;"></a>&#x6807;&#x7B7E;&#x5D4C;&#x5957;</h2><ul>
<li>&#x5757;&#x7EA7;&#x5143;&#x7D20;  &#x2014;  &#x4EFB;&#x4F55;&#x5143;&#x7D20;&#x53EF;&#x4EE5;&#x7684;&#x3002;     </li>
<li>&#x884C;&#x5185;&#x5143;&#x7D20;  &#x2013;    &#x884C;&#x5185;&#x5143;&#x7D20;  &#x53EA; &#x5D4C;&#x5957;&#x5143;&#x7D20;    b  u span   i -  s- P , &#x4E0D;&#x80FD;&#x653E; div &#x3002;    </li>
<li>a &#x65E0;&#x6240;&#x4E0D;&#x80FD; &#x3002;    a&#x91CC;&#x9762;&#x4E0D;&#x80FD;&#x653E; a    input &#x7B49;<a id="more"></a>
</li>
</ul>
<h2 id="Z-index-&#x5C42;&#x7EA7;-div-&#x5C42;"><a href="#Z-index-&#x5C42;&#x7EA7;-div-&#x5C42;" class="headerlink" title="Z-index  &#x5C42;&#x7EA7;   div &#x5C42;"></a>Z-index  &#x5C42;&#x7EA7;   div &#x5C42;</h2><ul>
<li>&#x53EA;&#x6709; &#x5B9A;&#x4F4D;&#x7684;&#x76D2;&#x5B50; &#xFF08;&#x9664;&#x4E86;static&#xFF09; &#x624D;&#x6709; z-index&#xFF0C;&#x5982;&#x679C;&#x90FD;&#x662F;&#x5B9A;&#x4F4D;  &#x7EDD;&#x5BF9;&#x5B9A;&#x4F4D; &#x4ED6;&#x4EEC;&#x9ED8;&#x8BA4;&#x7684;z-index  &#x662F;  0   </li>
<li>&#x6700;&#x540E;&#x7684;&#x4E00;&#x4E2A;  &#x9760;&#x4E0A;</li>
</ul>
<h2 id="css&#x4E24;&#x4E2A;&#x6027;&#x8D28;"><a href="#css&#x4E24;&#x4E2A;&#x6027;&#x8D28;" class="headerlink" title="css&#x4E24;&#x4E2A;&#x6027;&#x8D28;"></a>css&#x4E24;&#x4E2A;&#x6027;&#x8D28;</h2><ul>
<li>&#x7EE7;&#x627F;&#x6027;&#x3002;&#x6709;&#x4E00;&#x4E9B;&#x5C5E;&#x6027;&#x7ED9;&#x7956;&#x5148;&#x5143;&#x7D20;&#xFF0C;&#x6240;&#x6709;&#x7684;&#x540E;&#x4EE3;&#x5143;&#x7D20;&#x90FD;&#x96C6;&#x6210;&#x4E0A;&#x4E86;&#x3002;&#x54EA;&#x4E9B;&#x5C5E;&#x6027;&#x80FD;&#x7EE7;&#x627F;&#xFF1A;color&#x3001;font-&#x3001;text-&#x3001;line-</li>
<li>&#x5C42;&#x53E0;&#x6027;&#x3002;&#x5C42;&#x53E0;&#x6027;&#x662F;&#x4E00;&#x79CD;&#x80FD;&#x529B;&#xFF0C;&#x5C31;&#x662F;&#x5904;&#x7406;&#x51B2;&#x7A81;&#x7684;&#x80FD;&#x529B;&#x3002;&#x5F53;&#x4E0D;&#x540C;&#x9009;&#x62E9;&#x5668;&#xFF0C;&#x5BF9;&#x4E00;&#x4E2A;&#x6807;&#x7B7E;&#x7684;&#x540C;&#x4E00;&#x4E2A;&#x6837;&#x5F0F;&#xFF0C;&#x6709;&#x4E0D;&#x540C;&#x7684;&#x503C;&#xFF0C;&#x542C;&#x8C01;&#x7684;&#xFF1F;&#x8FD9;&#x5C31;&#x662F;&#x51B2;&#x7A81;&#x3002;css&#x6709;&#x7740;&#x4E25;&#x683C;&#x7684;&#x5904;&#x7406;&#x51B2;&#x7A81;&#x7684;&#x673A;&#x5236;&#xFF1A;<br>1,&#x9009;&#x62E9;&#x4E0A;&#x4E86;&#xFF0C;&#x6570;&#x6743;&#x91CD;&#xFF0C;(id&#x7684;&#x6570;&#x91CF;&#xFF0C;&#x7C7B;&#x7684;&#x6570;&#x91CF;&#xFF0C;&#x6807;&#x7B7E;&#x7684;&#x6570;&#x91CF;)&#x3002;&#x5982;&#x679C;&#x6743;&#x91CD;&#x4E00;&#x6837;&#xFF0C;&#x8C01;&#x5199;&#x5728;&#x540E;&#x9762;&#x542C;&#x8C01;&#x7684;&#x3002;<br>2,&#x6CA1;&#x6709;&#x9009;&#x62E9;&#x4E0A;&#xFF0C;&#x901A;&#x8FC7;&#x7EE7;&#x627F;&#x5F71;&#x54CD;&#x7684;&#xFF0C;&#x5C31;&#x8FD1;&#x539F;&#x5219;&#xFF0C;&#x8C01;&#x63CF;&#x8FF0;&#x7684;&#x8FD1;&#x542C;&#x8C01;&#x7684;&#x3002;&#x5982;&#x679C;&#x63CF;&#x8FF0;&#x7684;&#x4E00;&#x6837;&#x8FD1;&#xFF0C;&#x6BD4;&#x5982;&#x9009;&#x62E9;&#x5668;&#x6743;&#x91CD;&#xFF0C;&#x5982;&#x679C;&#x6743;&#x91CD;&#x518D;&#x4E00;&#x6837;&#x91CD;&#xFF0C;&#x8C01;&#x5199;&#x5728;&#x540E;&#x9762;&#x542C;&#x8C01;&#x7684;</li>
</ul>
<h2 id="important&#x6807;&#x8BB0;"><a href="#important&#x6807;&#x8BB0;" class="headerlink" title="!important&#x6807;&#x8BB0;"></a>!important&#x6807;&#x8BB0;</h2><p>&#x7528;&#x6765;&#x7ED9;&#x4E00;&#x4E2A;&#x5C5E;&#x6027;&#x63D0;&#x9AD8;&#x6743;&#x91CD;&#x3002;&#x8FD9;&#x4E2A;&#x5C5E;&#x6027;&#x7684;&#x6743;&#x91CD;&#x5C31;&#x662F;&#x65E0;&#x7A77;&#x5927;&#x3002;&#x5199;&#x6CD5;&#xFF1A;<br><figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">&#x6B63;&#x786E;&#x7684;&#xFF1A;</span><br><span class="line">	font-size:60px !important;</span><br><span class="line">&#x9519;&#x8BEF;&#x7684;&#xFF1A;</span><br><span class="line">	font-size:60px; !important;     &#x2192; &#x4E0D;&#x80FD;&#x628A;!important&#x5199;&#x5728;&#x5916;&#x9762;</span><br><span class="line">	font-size:60px important;      &#x2192;  &#x4E0D;&#x80FD;&#x5FD8;&#x8BB0;&#x611F;&#x53F9;&#x53F7;</span><br></pre></td></tr></table></figure></p>
<p>!important&#x4E0D;&#x5F71;&#x54CD;&#x5C31;&#x8FD1;&#x539F;&#x5219;</p>
<h2 id="&#x5757;&#x7EA7;&#x5143;&#x7D20;&#x548C;&#x884C;&#x5185;&#x5143;&#x7D20;"><a href="#&#x5757;&#x7EA7;&#x5143;&#x7D20;&#x548C;&#x884C;&#x5185;&#x5143;&#x7D20;" class="headerlink" title="&#x5757;&#x7EA7;&#x5143;&#x7D20;&#x548C;&#x884C;&#x5185;&#x5143;&#x7D20;"></a>&#x5757;&#x7EA7;&#x5143;&#x7D20;&#x548C;&#x884C;&#x5185;&#x5143;&#x7D20;</h2><p>1,&#x5757;&#x7EA7;&#x5143;&#x7D20;</p>
<ul>
<li>&#x9738;&#x5360;&#x4E00;&#x884C;&#xFF0C;&#x4E0D;&#x80FD;&#x4E0E;&#x5176;&#x4ED6;&#x4EFB;&#x4F55;&#x5143;&#x7D20;&#x5E76;&#x5217;</li>
<li>&#x80FD;&#x63A5;&#x53D7;&#x5BBD;&#x3001;&#x9AD8;</li>
<li>&#x5982;&#x679C;&#x4E0D;&#x8BBE;&#x7F6E;&#x5BBD;&#x5EA6;&#xFF0C;&#x90A3;&#x4E48;&#x5BBD;&#x5EA6;&#x5C06;&#x9ED8;&#x8BA4;&#x53D8;&#x4E3A;&#x7236;&#x4EB2;&#x7684;100%&#x3002;</li>
</ul>
<p>2,&#x884C;&#x5185;&#x5143;&#x7D20;- &#x4E0E;&#x5176;&#x4ED6;&#x884C;&#x5185;&#x5143;&#x7D20;&#x5E76;&#x6392;</p>
<ul>
<li><p>&#x4E0D;&#x80FD;&#x8BBE;&#x7F6E;&#x5BBD;&#x3001;&#x9AD8;&#x3002;&#x9ED8;&#x8BA4;&#x7684;&#x5BBD;&#x5EA6;&#xFF0C;&#x5C31;&#x662F;&#x6587;&#x5B57;&#x7684;&#x5BBD;&#x5EA6;&#x3002;</p>
<p>  &#x5728;HTML&#x4E2D;&#xFF0C;&#x6211;&#x4EEC;&#x5DF2;&#x7ECF;&#x5C06;&#x6807;&#x7B7E;&#x5206;&#x8FC7;&#x7C7B;&#xFF0C;&#x5F53;&#x65F6;&#x5206;&#x4E3A;&#x4E86;&#xFF1A;&#x6587;&#x672C;&#x7EA7;&#x3001;&#x5BB9;&#x5668;&#x7EA7;&#x3002;<br>  &#x6587;&#x672C;&#x7EA7;&#xFF1A;p&#x3001;span&#x3001;a&#x3001;b&#x3001;i&#x3001;u&#x3001;em<br>  &#x5BB9;&#x5668;&#x7EA7;&#xFF1A;div&#x3001;h&#x7CFB;&#x5217;&#x3001;li&#x3001;dt&#x3001;dd</p>
<p>  CSS&#x7684;&#x5206;&#x7C7B;&#x548C;&#x4E0A;&#x9762;&#x7684;&#x5F88;&#x50CF;&#xFF0C;&#x5C31;p&#x4E0D;&#x4E00;&#x6837;&#xFF1A;<br>  &#x6240;&#x6709;&#x7684;&#x6587;&#x672C;&#x7EA7;&#x6807;&#x7B7E;&#xFF0C;&#x90FD;&#x662F;&#x884C;&#x5185;&#x5143;&#x7D20;&#xFF0C;&#x9664;&#x4E86;p&#xFF0C;p&#x662F;&#x4E2A;&#x6587;&#x672C;&#x7EA7;&#xFF0C;&#x4F46;&#x662F;&#x662F;&#x4E2A;&#x5757;&#x7EA7;&#x5143;&#x7D20;&#x3002;<br>  &#x6240;&#x6709;&#x7684;&#x5BB9;&#x5668;&#x7EA7;&#x6807;&#x7B7E;&#x90FD;&#x662F;&#x5757;&#x7EA7;&#x5143;&#x7D20;&#x3002;</p>
<h2 id="&#x5757;&#x7EA7;&#x5143;&#x7D20;&#x548C;&#x884C;&#x5185;&#x5143;&#x7D20;&#x7684;&#x76F8;&#x4E92;&#x8F6C;&#x6362;"><a href="#&#x5757;&#x7EA7;&#x5143;&#x7D20;&#x548C;&#x884C;&#x5185;&#x5143;&#x7D20;&#x7684;&#x76F8;&#x4E92;&#x8F6C;&#x6362;" class="headerlink" title="&#x5757;&#x7EA7;&#x5143;&#x7D20;&#x548C;&#x884C;&#x5185;&#x5143;&#x7D20;&#x7684;&#x76F8;&#x4E92;&#x8F6C;&#x6362;"></a>&#x5757;&#x7EA7;&#x5143;&#x7D20;&#x548C;&#x884C;&#x5185;&#x5143;&#x7D20;&#x7684;&#x76F8;&#x4E92;&#x8F6C;&#x6362;</h2><figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">div{</span><br><span class="line">	display: inline;</span><br><span class="line">	background-color: pink;</span><br><span class="line">	width: 500px;</span><br><span class="line">	height: 500px;</span><br><span class="line">	}</span><br></pre></td></tr></table></figure>
</li>
</ul>
<p>&#x4E0A;&#x9762;&#x7684;&#x4F8B;&#x5B50;div&#x5C31;&#x901A;&#x8FC7;&#x201C;display: inline&#x201D;&#x8F6C;&#x6210;&#x4E86;&#x884C;&#x5185;&#x5143;&#x7D20;</p>
<ul>
<li>&#x6B64;&#x65F6;&#x8FD9;&#x4E2A;div&#x4E0D;&#x80FD;&#x8BBE;&#x7F6E;&#x5BBD;&#x5EA6;&#x3001;&#x9AD8;&#x5EA6;&#xFF1B;</li>
<li>&#x6B64;&#x65F6;&#x8FD9;&#x4E2A;div&#x53EF;&#x4EE5;&#x548C;&#x522B;&#x4EBA;&#x5E76;&#x6392;&#x4E86;<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">span{</span><br><span class="line">	display: block;</span><br><span class="line">	width: 200px;</span><br><span class="line">	height: 200px;</span><br><span class="line">	background-color: pink;</span><br><span class="line">		}</span><br></pre></td></tr></table></figure>
</li>
</ul>
<p>&#x8BA9;&#x6807;&#x7B7E;&#x53D8;&#x4E3A;&#x5757;&#x7EA7;&#x5143;&#x7D20;&#x3002;&#x6B64;&#x65F6;&#x8FD9;&#x4E2A;&#x6807;&#x7B7E;&#xFF0C;&#x548C;&#x4E00;&#x4E2A;div&#x65E0;&#x5F02;&#xFF1A;</p>
<ul>
<li>&#x6B64;&#x65F6;&#x8FD9;&#x4E2A;span&#x80FD;&#x591F;&#x8BBE;&#x7F6E;&#x5BBD;&#x5EA6;&#x3001;&#x9AD8;&#x5EA6;</li>
<li>&#x6B64;&#x65F6;&#x8FD9;&#x4E2A;span&#x5FC5;&#x987B;&#x9738;&#x5360;&#x4E00;&#x884C;&#x4E86;&#xFF0C;&#x522B;&#x4EBA;&#x65E0;&#x6CD5;&#x548C;&#x4ED6;&#x5E76;&#x6392;</li>
<li>&#x5982;&#x679C;&#x4E0D;&#x8BBE;&#x7F6E;&#x5BBD;&#x5EA6;&#xFF0C;&#x5C06;&#x6491;&#x6EE1;&#x7236;&#x4EB2;</li>
</ul>
<h2 id="&#x8131;&#x79BB;&#x6807;&#x51C6;&#x6D41;&#x7684;&#x65B9;&#x6CD5;"><a href="#&#x8131;&#x79BB;&#x6807;&#x51C6;&#x6D41;&#x7684;&#x65B9;&#x6CD5;" class="headerlink" title="&#x8131;&#x79BB;&#x6807;&#x51C6;&#x6D41;&#x7684;&#x65B9;&#x6CD5;"></a>&#x8131;&#x79BB;&#x6807;&#x51C6;&#x6D41;&#x7684;&#x65B9;&#x6CD5;</h2><p>css&#x4E2D;&#x4E00;&#x5171;&#x6709;&#x4E09;&#x79CD;&#x624B;&#x6BB5;&#xFF0C;&#x4F7F;&#x4E00;&#x4E2A;&#x5143;&#x7D20;&#x8131;&#x79BB;&#x6807;&#x51C6;&#x6587;&#x6863;&#x6D41;&#xFF1A;</p>
<ul>
<li>&#x6D6E;&#x52A8;</li>
<li>&#x7EDD;&#x5BF9;&#x5B9A;&#x4F4D;</li>
<li>&#x56FA;&#x5B9A;&#x5B9A;&#x4F4D;</li>
</ul>
<h2 id="&#x6D6E;&#x52A8;"><a href="#&#x6D6E;&#x52A8;" class="headerlink" title="&#x6D6E;&#x52A8;"></a>&#x6D6E;&#x52A8;</h2><p>&#x6D6E;&#x52A8;&#x662F;css&#x91CC;&#x9762;&#x5E03;&#x5C40;&#x7528;&#x7684;&#x6700;&#x591A;&#x7684;&#x5C5E;&#x6027;&#x3002;&#x6D6E;&#x52A8;&#x6709;&#x4E09;&#x4E2A;&#x6027;&#x8D28;</p>
<h3 id="&#x6027;&#x8D28;&#x4E00;"><a href="#&#x6027;&#x8D28;&#x4E00;" class="headerlink" title="&#x6027;&#x8D28;&#x4E00;"></a>&#x6027;&#x8D28;&#x4E00;</h3><ul>
<li>&#x6D6E;&#x52A8;&#x7684;&#x5143;&#x7D20;&#x8131;&#x6807;<figure class="highlight html"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">&#x4E00;&#x4E2A;span&#x6807;&#x7B7E;&#x4E0D;&#x9700;&#x8981;&#x8F6C;&#x6210;&#x5757;&#x7EA7;&#x5143;&#x7D20;&#xFF0C;&#x5C31;&#x80FD;&#x591F;&#x8BBE;&#x7F6E;&#x5BBD;&#x5EA6;&#x3001;&#x9AD8;&#x5EA6;&#x4E86;&#x3002;&#x6240;&#x4EE5;&#x80FD;&#x591F;&#x8BC1;&#x660E;&#x4E00;&#x4EF6;&#x4E8B;&#x513F;&#xFF0C;</span><br><span class="line">&#x5C31;&#x662F;&#x6240;&#x6709;&#x6807;&#x7B7E;&#x5DF2;&#x7ECF;&#x4E0D;&#x533A;&#x5206;&#x884C;&#x5185;&#x3001;&#x5757;&#x4E86;&#x3002;&#x4E5F;&#x5C31;&#x662F;&#x8BF4;&#xFF0C;&#x4E00;&#x65E6;&#x4E00;&#x4E2A;&#x5143;&#x7D20;&#x6D6E;&#x52A8;&#x4E86;&#xFF0C;&#x90A3;&#x4E48;&#xFF0C;&#x5C06;&#x80FD;&#x591F;&#x5E76;&#x6392;&#x4E86;&#xFF0C;&#x5E76;&#x4E14;&#x80FD;&#x591F;&#x8BBE;&#x7F6E;&#x5BBD;&#x9AD8;&#x4E86;&#x3002;</span><br><span class="line">&#x65E0;&#x8BBA;&#x5B83;&#x539F;&#x6765;&#x662F;&#x4E2A;div&#x8FD8;&#x662F;&#x4E2A;span&#x3002;</span><br></pre></td></tr></table></figure>
</li>
</ul>
<h3 id="&#x6027;&#x8D28;&#x4E8C;"><a href="#&#x6027;&#x8D28;&#x4E8C;" class="headerlink" title="&#x6027;&#x8D28;&#x4E8C;"></a>&#x6027;&#x8D28;&#x4E8C;</h3><ul>
<li>&#x6D6E;&#x52A8;&#x7684;&#x5143;&#x7D20;&#x4E92;&#x76F8;&#x8D34;&#x9760;<h3 id="&#x6027;&#x8D28;&#x4E09;"><a href="#&#x6027;&#x8D28;&#x4E09;" class="headerlink" title="&#x6027;&#x8D28;&#x4E09;"></a>&#x6027;&#x8D28;&#x4E09;</h3></li>
<li>&#x6D6E;&#x52A8;&#x7684;&#x5143;&#x7D20;&#x6709;&#x201C;&#x5B57;&#x56F4;&#x201D;&#x6548;&#x679C;<h3 id="&#x6027;&#x8D28;&#x56DB;"><a href="#&#x6027;&#x8D28;&#x56DB;" class="headerlink" title="&#x6027;&#x8D28;&#x56DB;"></a>&#x6027;&#x8D28;&#x56DB;</h3></li>
<li>&#x6D6E;&#x52A8;&#x7684;&#x5143;&#x7D20;&#x8D34;&#x8FB9;<h3 id="&#x539F;&#x5219;"><a href="#&#x539F;&#x5219;" class="headerlink" title="&#x539F;&#x5219;"></a>&#x539F;&#x5219;</h3>&#x3000;&#x3000;&#x6C38;&#x8FDC;&#x4E0D;&#x662F;&#x4E00;&#x4E2A;&#x4E1C;&#x897F;&#x5355;&#x72EC;&#x6D6E;&#x52A8;&#xFF0C;&#x6D6E;&#x52A8;&#x90FD;&#x662F;&#x4E00;&#x8D77;&#x6D6E;&#x52A8;&#xFF0C;&#x8981;&#x6D6E;&#x52A8;&#xFF0C;&#x5927;&#x5BB6;&#x90FD;&#x6D6E;&#x52A8;&#x3002;</li>
</ul>

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        

      
    </div>


    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/HTML-CSS/" rel="tag"># HTML+CSS</a>
          
        </div>
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2016/11/29/前端HTML-CSS（一）/" rel="next" title="前端HTML+CSS（一）">
                <i class="fa fa-chevron-left"></i> 前端HTML+CSS（一）
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2016/11/29/前端HTML-CSS-（三）/" rel="prev" title="前端HTML+CSS（三）">
                前端HTML+CSS（三） <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          
  <div class="comments" id="comments">
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="/images/me.jpg"
               alt="JokerLiang" />
          <p class="site-author-name" itemprop="name">JokerLiang</p>
          <p class="site-description motion-element" itemprop="description">永远年轻，永远热泪盈眶。</p>
        </div>
        <nav class="site-state motion-element">
          <div class="site-state-item site-state-posts">
            <a href="/archives">
              <span class="site-state-item-count">61</span>
              <span class="site-state-item-name">日志</span>
            </a>
          </div>

          
            <div class="site-state-item site-state-categories">
              <a href="/categories">
                <span class="site-state-item-count">15</span>
                <span class="site-state-item-name">分类</span>
              </a>
            </div>
          

          
            <div class="site-state-item site-state-tags">
              <a href="/tags">
                <span class="site-state-item-count">17</span>
                <span class="site-state-item-name">标签</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="https://github.com/LoverJoker" target="_blank" title="GitHub">
                  
                    <i class="fa fa-fw fa-github"></i>
                  
                  GitHub
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="https://www.zhihu.com/people/lover-easy-7/activities" target="_blank" title="Twitter">
                  
                    <i class="fa fa-fw fa-twitter"></i>
                  
                  Twitter
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="http://weibo.com/2292572142/profile?rightmod=1&wvr=6&mod=personinfo" target="_blank" title="微博">
                  
                    <i class="fa fa-fw fa-globe"></i>
                  
                  微博
                </a>
              </span>
            
          
        </div>

        
        

        
        
          <div class="links-of-blogroll motion-element links-of-blogroll-inline">
            <div class="links-of-blogroll-title">
              <i class="fa  fa-fw fa-globe"></i>
              Friends
            </div>
            <ul class="links-of-blogroll-list">
              
                <li class="links-of-blogroll-item">
                  <a href="http://www.knight.ac.cn/" title="Knight" target="_blank">Knight</a>
                </li>
              
                <li class="links-of-blogroll-item">
                  <a href="http://lzllzl.cn/" title="Zayvion" target="_blank">Zayvion</a>
                </li>
              
                <li class="links-of-blogroll-item">
                  <a href="http://chen97.com/" title="Chens" target="_blank">Chens</a>
                </li>
              
            </ul>
          </div>
        

        


      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#鼠标样式"><span class="nav-number">1.</span> <span class="nav-text">鼠标样式</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#border-radius（圆角矩形）"><span class="nav-number">2.</span> <span class="nav-text">border-radius（圆角矩形）</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#标签嵌套"><span class="nav-number">3.</span> <span class="nav-text">标签嵌套</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Z-index-层级-div-层"><span class="nav-number">4.</span> <span class="nav-text">Z-index  层级   div 层</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#css两个性质"><span class="nav-number">5.</span> <span class="nav-text">css两个性质</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#important标记"><span class="nav-number">6.</span> <span class="nav-text">!important标记</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#块级元素和行内元素"><span class="nav-number">7.</span> <span class="nav-text">块级元素和行内元素</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#块级元素和行内元素的相互转换"><span class="nav-number">8.</span> <span class="nav-text">块级元素和行内元素的相互转换</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#脱离标准流的方法"><span class="nav-number">9.</span> <span class="nav-text">脱离标准流的方法</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#浮动"><span class="nav-number">10.</span> <span class="nav-text">浮动</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#性质一"><span class="nav-number">10.1.</span> <span class="nav-text">性质一</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#性质二"><span class="nav-number">10.2.</span> <span class="nav-text">性质二</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#性质三"><span class="nav-number">10.3.</span> <span class="nav-text">性质三</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#性质四"><span class="nav-number">10.4.</span> <span class="nav-text">性质四</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#原则"><span class="nav-number">10.5.</span> <span class="nav-text">原则</span></a></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2018</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">JokerLiang</span>
</div>


<div class="powered-by">
  由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动
</div>

<div class="theme-info">
  主题 -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Mist
  </a>
</div>


        

        
      </div>
    </footer>

    <div class="back-to-top">
      <i class="fa fa-arrow-up"></i>
    </div>
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  



  
  <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.1.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.1.0"></script>



  
  

  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.0"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.0"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.0"></script>



  



  




	




  
  
  <script type="text/javascript">
    // Popup Window;
    var isfetched = false;
    // Search DB path;
    var search_path = "search.xml";
    if (search_path.length == 0) {
      search_path = "search.xml";
    }
    var path = "/" + search_path;
    // monitor main search box;

    function proceedsearch() {
      $("body").append('<div class="popoverlay">').css('overflow', 'hidden');
      $('.popup').toggle();
    }
    // search function;
    var searchFunc = function(path, search_id, content_id) {
      'use strict';
      $.ajax({
        url: path,
        dataType: "xml",
        async: true,
        success: function( xmlResponse ) {
          // get the contents from search data
          isfetched = true;
          $('.popup').detach().appendTo('.header-inner');
          var datas = $( "entry", xmlResponse ).map(function() {
            return {
              title: $( "title", this ).text(),
              content: $("content",this).text(),
              url: $( "url" , this).text()
            };
          }).get();
          var $input = document.getElementById(search_id);
          var $resultContent = document.getElementById(content_id);
          $input.addEventListener('input', function(){
            var matchcounts = 0;
            var str='<ul class=\"search-result-list\">';
            var keywords = this.value.trim().toLowerCase().split(/[\s\-]+/);
            $resultContent.innerHTML = "";
            if (this.value.trim().length > 1) {
              // perform local searching
              datas.forEach(function(data) {
                var isMatch = false;
                var content_index = [];
                var data_title = data.title.trim().toLowerCase();
                var data_content = data.content.trim().replace(/<[^>]+>/g,"").toLowerCase();
                var data_url = decodeURIComponent(data.url);
                var index_title = -1;
                var index_content = -1;
                var first_occur = -1;
                // only match artiles with not empty titles and contents
                if(data_title != '') {
                  keywords.forEach(function(keyword, i) {
                    index_title = data_title.indexOf(keyword);
                    index_content = data_content.indexOf(keyword);
                    if( index_title >= 0 || index_content >= 0 ){
                      isMatch = true;
                      if (i == 0) {
                        first_occur = index_content;
                      }
                    }

                  });
                }
                // show search results
                if (isMatch) {
                  matchcounts += 1;
                  str += "<li><a href='"+ data_url +"' class='search-result-title'>"+ data_title +"</a>";
                  var content = data.content.trim().replace(/<[^>]+>/g,"");
                  if (first_occur >= 0) {
                    // cut out 100 characters
                    var start = first_occur - 20;
                    var end = first_occur + 80;
                    if(start < 0){
                      start = 0;
                    }
                    if(start == 0){
                      end = 50;
                    }
                    if(end > content.length){
                      end = content.length;
                    }
                    var match_content = content.substring(start, end);
                    // highlight all keywords
                    keywords.forEach(function(keyword){
                      var regS = new RegExp(keyword, "gi");
                      match_content = match_content.replace(regS, "<b class=\"search-keyword\">"+keyword+"</b>");
                    });

                    str += "<p class=\"search-result\">" + match_content +"...</p>"
                  }
                  str += "</li>";
                }
              })};
            str += "</ul>";
            if (matchcounts == 0) { str = '<div id="no-result"><i class="fa fa-frown-o fa-5x" /></div>' }
            if (keywords == "") { str = '<div id="no-result"><i class="fa fa-search fa-5x" /></div>' }
            $resultContent.innerHTML = str;
          });
          proceedsearch();
        }
      });}

    // handle and trigger popup window;
    $('.popup-trigger').click(function(e) {
      e.stopPropagation();
      if (isfetched == false) {
        searchFunc(path, 'local-search-input', 'local-search-result');
      } else {
        proceedsearch();
      };
    });

    $('.popup-btn-close').click(function(e){
      $('.popup').hide();
      $(".popoverlay").remove();
      $('body').css('overflow', '');
    });
    $('.popup').click(function(e){
      e.stopPropagation();
    });
  </script>


  

  

  

  


</body>
</html>
